package com.yuanfeng.userms.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户基本信息表
 * @TableName user_info
 */
@TableName(value ="user_info")
@Data
public class UserInfoEntity implements Serializable {
    /**
     * 用户ID
     */
    @TableId
    private String userId;

    /**
     * 手机号码
     */
    private String userMobile;

    /**
     * 密码
     */
    private String password;

    /**
     * 用户昵称 不唯一
     */
    private String userName;

    /**
     * 状态(0:未激活,1:未认证,2:已认证,3:锁定4.多账号)
     */
    private Boolean userState;

    /**
     * 用户积分
     */
    private Integer userIntegral;

    /**
     * 
     */
    private String sessionId;

    /**
     * 是否是天九会员，1-是，0-不是，默认0，不是
     */
    private Boolean isTjMember;

    /**
     * 北京光声_客户端token
     */
    private String clientToken;

    /**
     * 北京光声_商户端token
     */
    private String merchantToken;

    /**
     * 上次登录时间
     */
    private Date userLastloginTime;

    /**
     * 上次登录IP
     */
    private String userLastloginIp;

    /**
     * 登录次数 
     */
    private Integer userCountLogin;

    /**
     * 是否为新用户 0 不是  1是
     */
    private Integer userIsNew;

    /**
     * 用户昵称
     */
    private String userNickname;

    /**
     * 是否是联营商，1-是，0-不是，默认0，不是',
     */
    private Byte isManagementBusiness;

    /**
     * 0 默认  1 非默认
     */
    private Boolean isDefault;

    /**
     * 创建者
     */
    private String createUser;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 修改人
     */
    private String updateUser;

    /**
     * 修改时间
     */
    private Date updateTime;

    /**
     * 是否删除0:否;1:是
     */
    private Integer isDelete;

    /**
     * 版本号
     */
    private Integer sysVersion;

    /**
     * 时间戳
     */
    private Date ts;

    /**
     * 0门店会员 1 市级代理  2 省级代理 3厂商
     */
    private Integer accountType;

    /**
     * 社区个人页背景图
     */
    private String communityBackground;

    /**
     * 社区个性签名
     */
    private String userSignature;

    /**
     * 是否企业:1-是;0-否
     */
    private Integer isBusiness;

    /**
     * 粉丝数
     */
    private Integer followerNum;

    /**
     * 关注数
     */
    private Integer followNum;

    /**
     * 会员等级id
     */
    private Integer gradeId;

    /**
     * 成为会员时间
     */
    private Date memberCreateTime;

    /**
     * 支付密码
     */
    private String payPassword;

    /**
     * 店铺id
     */
    private Integer shopId;


    /**
     * 是否是商户 0否 1是
     */
    @TableField(exist = false)
    private Integer isShop;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UserInfoEntity other = (UserInfoEntity) that;
        return (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getUserMobile() == null ? other.getUserMobile() == null : this.getUserMobile().equals(other.getUserMobile()))
            && (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()))
            && (this.getUserName() == null ? other.getUserName() == null : this.getUserName().equals(other.getUserName()))
            && (this.getUserState() == null ? other.getUserState() == null : this.getUserState().equals(other.getUserState()))
            && (this.getUserIntegral() == null ? other.getUserIntegral() == null : this.getUserIntegral().equals(other.getUserIntegral()))
            && (this.getSessionId() == null ? other.getSessionId() == null : this.getSessionId().equals(other.getSessionId()))
            && (this.getIsTjMember() == null ? other.getIsTjMember() == null : this.getIsTjMember().equals(other.getIsTjMember()))
            && (this.getClientToken() == null ? other.getClientToken() == null : this.getClientToken().equals(other.getClientToken()))
            && (this.getMerchantToken() == null ? other.getMerchantToken() == null : this.getMerchantToken().equals(other.getMerchantToken()))
            && (this.getUserLastloginTime() == null ? other.getUserLastloginTime() == null : this.getUserLastloginTime().equals(other.getUserLastloginTime()))
            && (this.getUserLastloginIp() == null ? other.getUserLastloginIp() == null : this.getUserLastloginIp().equals(other.getUserLastloginIp()))
            && (this.getUserCountLogin() == null ? other.getUserCountLogin() == null : this.getUserCountLogin().equals(other.getUserCountLogin()))
            && (this.getUserIsNew() == null ? other.getUserIsNew() == null : this.getUserIsNew().equals(other.getUserIsNew()))
            && (this.getUserNickname() == null ? other.getUserNickname() == null : this.getUserNickname().equals(other.getUserNickname()))
            && (this.getIsManagementBusiness() == null ? other.getIsManagementBusiness() == null : this.getIsManagementBusiness().equals(other.getIsManagementBusiness()))
            && (this.getIsDefault() == null ? other.getIsDefault() == null : this.getIsDefault().equals(other.getIsDefault()))
            && (this.getCreateUser() == null ? other.getCreateUser() == null : this.getCreateUser().equals(other.getCreateUser()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateUser() == null ? other.getUpdateUser() == null : this.getUpdateUser().equals(other.getUpdateUser()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()))
            && (this.getSysVersion() == null ? other.getSysVersion() == null : this.getSysVersion().equals(other.getSysVersion()))
            && (this.getTs() == null ? other.getTs() == null : this.getTs().equals(other.getTs()))
            && (this.getAccountType() == null ? other.getAccountType() == null : this.getAccountType().equals(other.getAccountType()))
            && (this.getCommunityBackground() == null ? other.getCommunityBackground() == null : this.getCommunityBackground().equals(other.getCommunityBackground()))
            && (this.getUserSignature() == null ? other.getUserSignature() == null : this.getUserSignature().equals(other.getUserSignature()))
            && (this.getIsBusiness() == null ? other.getIsBusiness() == null : this.getIsBusiness().equals(other.getIsBusiness()))
            && (this.getFollowerNum() == null ? other.getFollowerNum() == null : this.getFollowerNum().equals(other.getFollowerNum()))
            && (this.getFollowNum() == null ? other.getFollowNum() == null : this.getFollowNum().equals(other.getFollowNum()))
            && (this.getGradeId() == null ? other.getGradeId() == null : this.getGradeId().equals(other.getGradeId()))
            && (this.getMemberCreateTime() == null ? other.getMemberCreateTime() == null : this.getMemberCreateTime().equals(other.getMemberCreateTime()))
            && (this.getPayPassword() == null ? other.getPayPassword() == null : this.getPayPassword().equals(other.getPayPassword()))
            && (this.getShopId() == null ? other.getShopId() == null : this.getShopId().equals(other.getShopId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getUserMobile() == null) ? 0 : getUserMobile().hashCode());
        result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
        result = prime * result + ((getUserName() == null) ? 0 : getUserName().hashCode());
        result = prime * result + ((getUserState() == null) ? 0 : getUserState().hashCode());
        result = prime * result + ((getUserIntegral() == null) ? 0 : getUserIntegral().hashCode());
        result = prime * result + ((getSessionId() == null) ? 0 : getSessionId().hashCode());
        result = prime * result + ((getIsTjMember() == null) ? 0 : getIsTjMember().hashCode());
        result = prime * result + ((getClientToken() == null) ? 0 : getClientToken().hashCode());
        result = prime * result + ((getMerchantToken() == null) ? 0 : getMerchantToken().hashCode());
        result = prime * result + ((getUserLastloginTime() == null) ? 0 : getUserLastloginTime().hashCode());
        result = prime * result + ((getUserLastloginIp() == null) ? 0 : getUserLastloginIp().hashCode());
        result = prime * result + ((getUserCountLogin() == null) ? 0 : getUserCountLogin().hashCode());
        result = prime * result + ((getUserIsNew() == null) ? 0 : getUserIsNew().hashCode());
        result = prime * result + ((getUserNickname() == null) ? 0 : getUserNickname().hashCode());
        result = prime * result + ((getIsManagementBusiness() == null) ? 0 : getIsManagementBusiness().hashCode());
        result = prime * result + ((getIsDefault() == null) ? 0 : getIsDefault().hashCode());
        result = prime * result + ((getCreateUser() == null) ? 0 : getCreateUser().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateUser() == null) ? 0 : getUpdateUser().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        result = prime * result + ((getSysVersion() == null) ? 0 : getSysVersion().hashCode());
        result = prime * result + ((getTs() == null) ? 0 : getTs().hashCode());
        result = prime * result + ((getAccountType() == null) ? 0 : getAccountType().hashCode());
        result = prime * result + ((getCommunityBackground() == null) ? 0 : getCommunityBackground().hashCode());
        result = prime * result + ((getUserSignature() == null) ? 0 : getUserSignature().hashCode());
        result = prime * result + ((getIsBusiness() == null) ? 0 : getIsBusiness().hashCode());
        result = prime * result + ((getFollowerNum() == null) ? 0 : getFollowerNum().hashCode());
        result = prime * result + ((getFollowNum() == null) ? 0 : getFollowNum().hashCode());
        result = prime * result + ((getGradeId() == null) ? 0 : getGradeId().hashCode());
        result = prime * result + ((getMemberCreateTime() == null) ? 0 : getMemberCreateTime().hashCode());
        result = prime * result + ((getPayPassword() == null) ? 0 : getPayPassword().hashCode());
        result = prime * result + ((getShopId() == null) ? 0 : getShopId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", userId=").append(userId);
        sb.append(", userMobile=").append(userMobile);
        sb.append(", password=").append(password);
        sb.append(", userName=").append(userName);
        sb.append(", userState=").append(userState);
        sb.append(", userIntegral=").append(userIntegral);
        sb.append(", sessionId=").append(sessionId);
        sb.append(", isTjMember=").append(isTjMember);
        sb.append(", clientToken=").append(clientToken);
        sb.append(", merchantToken=").append(merchantToken);
        sb.append(", userLastloginTime=").append(userLastloginTime);
        sb.append(", userLastloginIp=").append(userLastloginIp);
        sb.append(", userCountLogin=").append(userCountLogin);
        sb.append(", userIsNew=").append(userIsNew);
        sb.append(", userNickname=").append(userNickname);
        sb.append(", isManagementBusiness=").append(isManagementBusiness);
        sb.append(", isDefault=").append(isDefault);
        sb.append(", createUser=").append(createUser);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateUser=").append(updateUser);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", sysVersion=").append(sysVersion);
        sb.append(", ts=").append(ts);
        sb.append(", accountType=").append(accountType);
        sb.append(", communityBackground=").append(communityBackground);
        sb.append(", userSignature=").append(userSignature);
        sb.append(", isBusiness=").append(isBusiness);
        sb.append(", followerNum=").append(followerNum);
        sb.append(", followNum=").append(followNum);
        sb.append(", gradeId=").append(gradeId);
        sb.append(", memberCreateTime=").append(memberCreateTime);
        sb.append(", payPassword=").append(payPassword);
        sb.append(", shopId=").append(shopId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}